<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
  <button>显示当前时间</button>
    <div>某个时间</div>
  <script>
      let btn = document.querySelector('button');
      let div = document.querySelector('div');
      btn.onclick=function (){
          div.innerText='2019-6-6'
      }
  </script>
</body>
</html>